<template>
  <cu-layout :navProp="{ placeholder: true, bgColor: 'rgba(255,255,255)', title: title }" :bgStyle="{ color: '#ffffff' }" :showAgreementModal="false">
    <view :class="[`${prefixCls}-privacy-detail-container`]">
      <view class="v-html" v-html="container"></view>
    </view>
  </cu-layout>
</template>

<script>
import { mapActions, mapGetters } from 'vuex'
import { getPrivacy } from './api'
export default {
  name: 'privacy-detail',
  components: {},
  mixins: [],
  props: {},
  data() {
    return {
      container: '',
      title: '',
    }
  },
  // 侦听属性
  watch: {},
  // 计算属性
  computed: {
    ...mapGetters([]),
  },
  // 监听页面加载，该钩子被调用时data,computed,function,watch,props,slots已设置完成
  onLoad(options) {
    this.getData()
  },
  // 监听页面显示，页面每次出现在屏幕上都触发
  onShow() {},
  // 监听页面初次渲染完成，此时组件已挂载完成
  onReady() {},
  // 下拉刷新
  onPullDownRefresh() {},
  // 加载更多
  onReachBottom() {},

  created() {},
  mounted() {},
  destroyed() {},
  methods: {
    ...mapActions([]),
    async getData() {
      const { subtitle, title } = this.$Route.query
      this.title = title
      const { data } = await getPrivacy({ subtitle })
      this.container = data
      // console.log('data', data)
    },
  },
}
</script>

<style lang="scss" scoped>
page {
  background: white !important;
}
.#{prefixCls('privacy-detail-container')} {
  position: relative;
  padding: 15px;
}
</style>
